using System;
using System.Collections.Generic;

// string new_path = @"C:\Users\SongJuYi\Documents\Unreal Projects\anim_template";
// string banyun_path = @"C:\Users\SongJuYi\Documents\Unreal Projects\anim_template";

var i = Task_uereplace(args);
Console.WriteLine(i);

static string get_arg(string arg_name, string[] args)
{
  string name = "";
  var argsList = new List<string>(args);

  if (!argsList.Contains(arg_name)) return name;

  int index = argsList.IndexOf(arg_name);

  if (!(index + 1 < argsList.Count))
    return name;

  name = argsList[index + 1];
  return name;
}

static int Task_uereplace(string[] args)
{
  string newprojp = get_arg(Param.NewProjP.name, args);
  string rpprojp = get_arg(Param.RpProjP.name, args);
  return ReplaceUEMacro.Exec(newprojp, rpprojp);
}
